---
layout: default
title: 欢迎来到我的首页
---

<ul class="post-list">
    {% for post in paginator.posts %}
    <li>
      <div class="post-title">
        <a href="{{site.baseurl}}{{post.url}}"> {{post.title}}</a> </br>
      </div>

      <div class="post-info">
        <ol>
          <li class="post-time">{{ post.date | date: "%F" }}</li> 
          <li class="post-category"> 
           {{ post.categories | join: '&nbsp&nbsp' }}
          </li>
        </ol>
      </div>

      <div class="post-preview">
        {{ post.excerpt }} 
        <a href="{{site.baseurl}}{{post.url}}"> Read More ... </a> </br>
      </div>

    </li>
    {% endfor %}
</ul>

<!-- Pagination links -->
{% if paginator.total_pages > 1 %}
<div class="pagination">
  {% if paginator.previous_page %}
    <a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">&laquo; Prev</a>
  {% else %}
    <span>&laquo; Prev</span>
  {% endif %}

  {% for page in (1..paginator.total_pages) %}
    {% if page == paginator.page %}
      {{ page }}
    {% elsif page == 1 %}
      <a href="{{ '/index.html' | prepend: site.baseurl | replace: '//', '/' }}">{{ page }}</a>
    {% else %}
      <a href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}">{{ page }}</a>
    {% endif %}
  {% endfor %}

  {% if paginator.next_page %}
    <a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}">Next &raquo;</a>
  {% else %}
    <span>Next &raquo;</span>
  {% endif %}
</div>
{% endif %}
